/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pneuservis.frontend.web;

import javax.naming.InitialContext;
import javax.sql.DataSource;
import org.apache.shiro.realm.jdbc.JdbcRealm;

/**
 *
 * @author jajaja
 */
public class SecurityJdbcRealm extends JdbcRealm{

    public SecurityJdbcRealm() {
       super();
        InitialContext ctx;
        DataSource dataSource;
        
        try {
            ctx = new InitialContext();
            dataSource = (DataSource) ctx.lookup("jdbc/dynamicDB");
            this.setDataSource(dataSource);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
